home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / octa209s.zip / octave-2.09 / libs / kpathsea / c-fopen.h < prev    next >
C/C++ Source or Header  |  1996-11-02  |  2KB  |  60 lines

  1. /* c-fopen.h: how to open files with fopen.
  2.  
  3. Copyright (C) 1992, 94 Free Software Foundation, Inc.
  4.  
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2, or (at your option)
  8. any later version.
  9.  
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. GNU General Public License for more details.
  14.  
  15. You should have received a copy of the GNU General Public License
  16. along with this program; if not, write to the Free Software
  17. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.  */
  18.  
  19. /* Modified by Klaus Gebhardt, 1996 */
  20.  
  21. #ifndef C_FOPEN_H
  22. #define C_FOPEN_H
  23.  
  24. /* How to open a text file:  */
  25. #ifndef FOPEN_A_MODE
  26. #define FOPEN_A_MODE "a"
  27. #endif
  28.  
  29. #ifndef FOPEN_R_MODE
  30. #define FOPEN_R_MODE "r"
  31. #endif
  32.  
  33. #ifndef FOPEN_W_MODE
  34. #define FOPEN_W_MODE "w"
  35. #endif
  36.  
  37. /* How to open a binary file for reading:  */
  38. #ifndef FOPEN_RBIN_MODE
  39. #if defined (VMS) || defined (DOS) || defined (OS2) || defined (VMCMS)
  40. #define    FOPEN_RBIN_MODE    "rb"
  41. #else
  42. #define    FOPEN_RBIN_MODE    "r"
  43. #endif /* not (VM/CMS or DOS or VMS) */
  44. #endif /* not FOPEN_RBIN_MODE */
  45.  
  46. /* How to open a binary file for writing:  */
  47. #ifndef FOPEN_WBIN_MODE
  48. #if defined (DOS) || defined (OS2)
  49. #define FOPEN_WBIN_MODE "wb"
  50. #else
  51. #ifdef VMCMS
  52. #define FOPEN_WBIN_MODE "wb, lrecl=1024, recfm=f"
  53. #else
  54. #define    FOPEN_WBIN_MODE    "w"
  55. #endif /* not VM/CMS */
  56. #endif /* not DOS */
  57. #endif /* not FOPEN_WBIN_MODE */
  58.  
  59. #endif /* not C_FOPEN_H */
  60.